﻿@model BskLeague.ViewModels.MyTeamEditDetailsViewModel

@{
    ViewBag.Title = "EditDetails";
}

<h2>EditDetails</h2>

@using (Html.BeginForm("EditDetails", "MyTeam", FormMethod.Post, new { enctype = "multipart/form-data" })) {

    var players = Model.Players.ToList();
    @Html.HiddenFor(item => Model.Match.MatchId)

    for (int i = 0; i < players.Count;i++)
    {
       <div>
            @Html.CheckBoxFor(item => Model.Played[i])
            @Html.HiddenFor(item => Model.Players[i].PlayerId)
            @Html.DisplayFor(item => players[i].PlayerName) @Html.DisplayFor(item => players[i].PlayerSurname) 

            punkty: @Html.EditorFor(item => Model.Points[i])
            faule: @Html.EditorFor(item => Model.Fauls[i])
            minuty: @Html.EditorFor(item => Model.Minutes[i])
            
        </div>
        
       
    }

<p id="submitP">
    <input type="submit" value="Prześlij" id="submitButton" />
</p>

}